<?php

// $str = "www888www456www888";

// $preg = "/\d{3}/";

// $c = preg_match_all($preg,$str,$out);

// var_dump($c);

// var_dump($out);

// <a href="/quanzhi?city=北京&amp;query=后厨" class="job-classify-btn" data-a-553d5a17>后厨</a>

// <a href="/quanzhi?city=北京&amp;query=杂工" class="job-classify-btn" data-a-553d5a17>杂工</a>
// 

// 读页面源码 

$data = file_get_contents("http://zhaopin.baidu.com/");

$preg = "/<a href=\"\/quanzhi\?city=北京&amp;query=.+?\" class=\"job-classify-btn\" data-a-553d5a17>(.+?)<\/a>/";


$c = preg_match_all($preg,$data,$out);

file_put_contents("job.txt", json_encode($out[1],JSON_UNESCAPED_UNICODE));

var_dump($c);
var_dump($out);